package com.bytedance.frameworks.baselib.a;

import android.content.Context;

import java.io.UnsupportedEncodingException;

public final class d {
    public static final class a implements b {
        public a() {

        }

        public final boolean a(Context arg2) {
            return false;
        }
    }

    public interface b {
        boolean a(Context arg1);
    }

    private static b a = new a();
    private static boolean b;

    public static void a(b arg1) {
        if (!d.b) {
            d.a = arg1;
            d.b = true;
        }
    }

    static boolean a(Context arg1) {
        return d.a.a(arg1);
    }

    public static byte[] a(String arg2) {
        byte[] v0 = null;
        if (arg2 != null) {
            try {
                if (arg2.length() <= 0) {
                    return v0;
                }
                v0 = arg2.getBytes("UTF-8");
            } catch (UnsupportedEncodingException v0_1) {
                v0 = arg2.getBytes();
            }
        }

        return v0;
    }
}

